# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kguiaddons
pkgver=5.72.0
pkgrel=0
pkgdesc="Addons to QtGui"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
makedepends="extra-cmake-modules doxygen qt5-qttools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kguiaddons-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}


package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="03037263d10dc75d7a409856d64b460e078e550841261287a141325a72aca3dc09ff5cb62f6c6a53ae44259380d283c9e76d33edc2a6e777c7ad58e379e64f30  kguiaddons-5.72.0.tar.xz"
